﻿using CPPEI.Coolzon.UI.Script;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI
{ 
    public partial class PartFrame
    {
        [Obsolete("此方法应该没有用")]
        public object getObject(string name)
        {
            if (this._currentPart == null)
            {
                return null;
            }
            else
            {
                if (_currentPart is IPartContainer)
                {
                    return (_currentPart as IPartContainer).GetChildPart(name, true);
                }
                else if (_currentPart.Name == name)
                {
                    return _currentPart;
                }
                return null;
            }
        }

        protected override object OnCreateScriptObj()
        {
            return new Script.FrameScriptObject(this);
        }
    }
}
